Integrand size = 28, antiderivative size = 81 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {B (b c-a d) g x}{2 d}-\frac {B (b c-a d)^2 g \log (c+d x)}{2 b d^2}+\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{2 b} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {2548, 21, 45} \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {g (a+b x)^2 \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right )}{2 b}-\frac {B g (b c-a d)^2 \log (c+d x)}{2 b d^2}+\frac {B g x (b c-a d)}{2 d} \]
[In]
[Out]
Rule 21
Rule 45
Rule 2548
Rubi steps \begin{align*} \text {integral}& = \frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{2 b}+\frac {(B (b c-a d)) \int \frac {(a g+b g x)^2}{(a+b x) (c+d x)} \, dx}{2 b g} \\ & = \frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{2 b}+\frac {(B (b c-a d) g) \int \frac {a+b x}{c+d x} \, dx}{2 b} \\ & = \frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{2 b}+\frac {(B (b c-a d) g) \int \left (\frac {b}{d}+\frac {-b c+a d}{d (c+d x)}\right ) \, dx}{2 b} \\ & = \frac {B (b c-a d) g x}{2 d}-\frac {B (b c-a d)^2 g \log (c+d x)}{2 b d^2}+\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{2 b} \\ \end{align*}
Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.85 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {g \left (\frac {B (b c-a d) (b d x+(-b c+a d) \log (c+d x))}{d^2}+(a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )\right )}{2 b} \]
[In]
[Out]
Time = 0.64 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.37
method | result | size |
risch | \(\frac {g B x \left (b x +2 a \right ) \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right )}{2}+\frac {g b A \,x^{2}}{2}+g A a x -\frac {B \,a^{2} g \ln \left (b x +a \right )}{2 b}+\frac {g B \ln \left (-d x -c \right ) a c}{d}-\frac {g b B \ln \left (-d x -c \right ) c^{2}}{2 d^{2}}-\frac {g B a x}{2}+\frac {g b B c x}{2 d}\) | \(111\) |
parallelrisch | \(\frac {B \,x^{2} \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{2} d^{2} g +A \,x^{2} b^{2} d^{2} g +2 B x \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a b \,d^{2} g +2 A x a b \,d^{2} g -B \ln \left (b x +a \right ) a^{2} d^{2} g +2 B \ln \left (b x +a \right ) a b c d g -B \ln \left (b x +a \right ) b^{2} c^{2} g -B x a b \,d^{2} g +B x \,b^{2} c d g +2 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a b c d g -B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{2} c^{2} g -2 A \,a^{2} d^{2} g -3 A a b c d g +B \,a^{2} d^{2} g -B \,b^{2} c^{2} g}{2 b \,d^{2}}\) | \(234\) |
parts | \(A g \left (\frac {1}{2} b \,x^{2}+a x \right )-B g \,e^{2} \left (a d -c b \right )^{2} \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\) | \(265\) |
derivativedivides | \(\frac {e \left (a d -c b \right ) \left (\frac {A b e g \left (a d -c b \right )}{2 \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}-B \,b^{2} e g \left (a d -c b \right ) \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\right )}{b^{2}}\) | \(315\) |
default | \(\frac {e \left (a d -c b \right ) \left (\frac {A b e g \left (a d -c b \right )}{2 \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}-B \,b^{2} e g \left (a d -c b \right ) \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (a d -c b \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\right )}{b^{2}}\) | \(315\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.57 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {A b^{2} d^{2} g x^{2} - B a^{2} d^{2} g \log \left (b x + a\right ) + {\left (B b^{2} c d + {\left (2 \, A - B\right )} a b d^{2}\right )} g x - {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} g \log \left (d x + c\right ) + {\left (B b^{2} d^{2} g x^{2} + 2 \, B a b d^{2} g x\right )} \log \left (\frac {d e x + c e}{b x + a}\right )}{2 \, b d^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (68) = 136\).
Time = 0.94 (sec) , antiderivative size = 253, normalized size of antiderivative = 3.12 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {A b g x^{2}}{2} - \frac {B a^{2} g \log {\left (x + \frac {\frac {B a^{3} d^{2} g}{b} + 2 B a^{2} c d g - B a b c^{2} g}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{2 b} + \frac {B c g \left (2 a d - b c\right ) \log {\left (x + \frac {3 B a^{2} c d g - B a b c^{2} g - B a c g \left (2 a d - b c\right ) + \frac {B b c^{2} g \left (2 a d - b c\right )}{d}}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{2 d^{2}} + x \left (A a g - \frac {B a g}{2} + \frac {B b c g}{2 d}\right ) + \left (B a g x + \frac {B b g x^{2}}{2}\right ) \log {\left (\frac {e \left (c + d x\right )}{a + b x} \right )} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.77 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {1}{2} \, A b g x^{2} + {\left (x \log \left (\frac {d e x}{b x + a} + \frac {c e}{b x + a}\right ) - \frac {a \log \left (b x + a\right )}{b} + \frac {c \log \left (d x + c\right )}{d}\right )} B a g + \frac {1}{2} \, {\left (x^{2} \log \left (\frac {d e x}{b x + a} + \frac {c e}{b x + a}\right ) + \frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} B b g + A a g x \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 627 vs. \(2 (75) = 150\).
Time = 0.46 (sec) , antiderivative size = 627, normalized size of antiderivative = 7.74 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {1}{2} \, {\left (\frac {{\left (B b^{3} c^{3} e^{3} g - 3 \, B a b^{2} c^{2} d e^{3} g + 3 \, B a^{2} b c d^{2} e^{3} g - B a^{3} d^{3} e^{3} g\right )} \log \left (\frac {d e x + c e}{b x + a}\right )}{b d^{2} e^{2} - \frac {2 \, {\left (d e x + c e\right )} b^{2} d e}{b x + a} + \frac {{\left (d e x + c e\right )}^{2} b^{3}}{{\left (b x + a\right )}^{2}}} + \frac {A b^{3} c^{3} d e^{3} g - B b^{3} c^{3} d e^{3} g - 3 \, A a b^{2} c^{2} d^{2} e^{3} g + 3 \, B a b^{2} c^{2} d^{2} e^{3} g + 3 \, A a^{2} b c d^{3} e^{3} g - 3 \, B a^{2} b c d^{3} e^{3} g - A a^{3} d^{4} e^{3} g + B a^{3} d^{4} e^{3} g + \frac {{\left (d e x + c e\right )} B b^{4} c^{3} e^{2} g}{b x + a} - \frac {3 \, {\left (d e x + c e\right )} B a b^{3} c^{2} d e^{2} g}{b x + a} + \frac {3 \, {\left (d e x + c e\right )} B a^{2} b^{2} c d^{2} e^{2} g}{b x + a} - \frac {{\left (d e x + c e\right )} B a^{3} b d^{3} e^{2} g}{b x + a}}{b d^{3} e^{2} - \frac {2 \, {\left (d e x + c e\right )} b^{2} d^{2} e}{b x + a} + \frac {{\left (d e x + c e\right )}^{2} b^{3} d}{{\left (b x + a\right )}^{2}}} + \frac {{\left (B b^{3} c^{3} e g - 3 \, B a b^{2} c^{2} d e g + 3 \, B a^{2} b c d^{2} e g - B a^{3} d^{3} e g\right )} \log \left (-d e + \frac {{\left (d e x + c e\right )} b}{b x + a}\right )}{b d^{2}} - \frac {{\left (B b^{3} c^{3} e g - 3 \, B a b^{2} c^{2} d e g + 3 \, B a^{2} b c d^{2} e g - B a^{3} d^{3} e g\right )} \log \left (\frac {d e x + c e}{b x + a}\right )}{b d^{2}}\right )} {\left (\frac {b c}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}} - \frac {a d}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}}\right )} \]
[In]
[Out]
Time = 1.08 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.56 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=x\,\left (\frac {g\,\left (4\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}-\frac {A\,g\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )+\ln \left (\frac {e\,\left (c+d\,x\right )}{a+b\,x}\right )\,\left (\frac {B\,b\,g\,x^2}{2}+B\,a\,g\,x\right )-\frac {\ln \left (c+d\,x\right )\,\left (B\,b\,c^2\,g-2\,B\,a\,c\,d\,g\right )}{2\,d^2}+\frac {A\,b\,g\,x^2}{2}-\frac {B\,a^2\,g\,\ln \left (a+b\,x\right )}{2\,b} \]
[In]
[Out]